import socket

socket_client = socket.socket()
socket_client.connect(('localhost', 8888))

# 发送消息
socket_client.send('你好啊'.encode('utf-8'))

# 接收消息
data = socket_client.recv(1024)
print(f"客户端接收的消息是：{data.decode('utf-8')}")

# 关闭连接
socket_client.close()
